package guoanmaker.operator.business.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import guoanmaker.operator.business.model.OperatorBoutiqueRecommend;
import guoanmaker.operator.business.model.OperatorQuestionOrder;

/**
 * 工单
 * 
 * @ClassName: OperatorQuestionOrderRepository
 * @Description:TODO (这里用一句话描述这个类的作用) 
 * @author lihongyu
 * @date 2017年8月9日 上午10:18:49    
 */
public interface OperatorQuestionOrderRepository
		extends JpaRepository<OperatorQuestionOrder, String>, JpaSpecificationExecutor<OperatorQuestionOrder> {
	@Query("select u from OperatorQuestionOrder u  where u.orderStatus=:orderStatus")
	   public Page<OperatorQuestionOrder> findByorderStatus(@Param("orderStatus") String orderStatus,Pageable pageable);

	@Query("select u from OperatorQuestionOrder u  where u.orderStatus=:orderStatus and u.departmentId.id=:departmentId")
	   public Page<OperatorQuestionOrder> findByorderStatusAnddepartmentId(@Param("orderStatus") String orderStatus,@Param("departmentId") String departmentId,Pageable pageable);

	@Query("select u from OperatorQuestionOrder u  where  u.departmentId.id=:departmentId")
	   public Page<OperatorQuestionOrder> findBydepartmentId(@Param("departmentId") String departmentId,Pageable pageable);
}
